<?php

require_once('../include/GeneralTop.php');
require('../include/class/db.php');

if (!$content_admin) {
	die('<div style="text-align:center">Permission denied...</div>');
}

$id = "-1";
if (isset($_GET['id'])) {
    $id = $_GET['id'];
}

$db = new db;
$sql = sprintf("SELECT * FROM sale WHERE id = %s", GetSQLValueString($id, "int"));
$res = $db->query($sql);
$row = $db->fetch($res);

include('AdminPanel.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="50%"  border="0" align="center" cellpadding="5" cellspacing="0" class="table_border_grey" style="margin-top:10px;">
  <tr>
    <td width="20%">id</td>
    <td width="80%"><?php echo $row['id']; ?></td>
  </tr>
  <tr>
    <td>名称</td>
    <td><?php echo $row['name']; ?></td>
  </tr>
  <tr>
    <td>照片</td>
    <td><img src="<?php echo IMAGES_SALE_FOLDER.$row['pic']; ?>" border="0" class="img_border"></td>
  </tr>
  <tr>
    <td>价格</td>
    <td><?php echo $row['price']; ?></td>
  </tr>
  <tr>
    <td>物品介绍</td>
    <td><?php echo $row['intro']; ?></td>
  </tr>
  <tr>
  	<td>&nbsp;</td>
    <td><input type="button" id="button" onclick="javascript:history.go(-1);" value="<?php echo TEXT_BACK?>"></td>
  </tr>
</table>

</body>
</html>